<?php
// +----------------------------------------------------------------------
// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2018 http://www.thinkcmf.com All rights reserved.
// +----------------------------------------------------------------------
// | Author: 熊义 <34521664@qq.com> Date: 2025/3/10
// | 
// +----------------------------------------------------------------------
namespace plugins\xiongyi\controller;

use cmf\controller\PluginBaseController;
//use think\Db;
//use think\facade\Db;

class IndexController extends PluginBaseController
{
    /**
     * 登录页
     * /plugin/xiongyi/index/login
     */
    public function login(){
        $config       = $this->getPlugin()->getConfig();
        $this->assign('config',$config);
        return $this->fetch();
    }

    /**
     * 微信用户绑定注册
     * https://f.kjdll.cn:9999/plugin/xiongyi/index/userbind
     * @return \think\response\Redirect
     * @throws \Exception
     */
    public function userbind()
    {
        $user = session('user');
        $newUser = session('newUser');
        if (!empty($user)){
            //将用户绑定 角色和组织机构
        }
        if (!empty($newUser)){
            //新用户注册
        }
        return $this->fetch();
    }


}